<!-- 变更记录 -->
<template>
  <dt-modal-info class="change_log" ref='logDetail' :line-number='3' :title='title'
    :label-width='90' :width='800'>
    <div slot='bottom' style="padding: 0 0 50px 0">
      <dt-grid :height='500' ref='changeLogTable' :list='tableList'>
      </dt-grid>
    </div>
  </dt-modal-info>
</template>

<script>
  import Opt from '../opt/changeLog'
  import Column from '../opt/changeLogColumn'
  import organApi from '@/biz/backStage/organizationManagement'
  export default {
    components: {},
    data() {
      return {
        title: '变更记录',
        info: null,
        tableList: []
      };
    },

    methods: {
      show(data) {
        this.info = data
        console.log(this.info)
        this.$refs.logDetail.show(new Opt(this.info))
        this.init()
      },
      //请求变更记录数据
      init() {
        this.$refs.changeLogTable.init(this, new Column(this))
        let params = {
          workNo: this.info.workNo
        }
        organApi.findRankLogByWorkNos({ ...params }).then(res => {
          console.log(res)
          this.tableList = res
        }).catch(err => {
          this.tableList = []
        })
      }
    },
  }
</script>
<style lang='scss' scoped>
  .change_log {}
</style>